using System;
using Unity.Profiling;
using UnityEngine;
using XLua;
using Yoozoo.Gameplay.City;

namespace com.yoozoo.gta.Gameplay.City.AI
{
    public class CityAIMono:MonoBehaviour
    {
        public static CityAIMono Instance;
        public int time;
        private LuaFunction _luaUpdate;
        private LuaFunction _luaUpdateSecond;
        private float _lastUpdateTime;

        [CSharpCallLua]
        private delegate void _LuaUpdate(float time, long serverTime);
        
        private bool isDisableUpdate = false;
        
        ProfilerMarker CityAIManagerUpdate = new ProfilerMarker("[C#]CityAIManager.Update");
        
        void Start()
        {
            Instance = this;
        }
        private void Update()
        {
            if (isDisableUpdate)
            {
                return;
            }
            CityAIManagerUpdate.Begin();
            CityAIManager.Instance.Update();
            CityAIManagerUpdate.End();
        }
    }
}